<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>嘉华金融</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/weui.min.css">
	<link rel="stylesheet" type="text/css" href="css/index.css">
	<link rel="stylesheet" type="text/css" href="css/swiper.min.css">
	<style>
		.loan-btn {
	width: 100%;
	height: 3.5rem;
	background: #fff;
	display: flex;
	font-size: 1.4rem;
	color: #787878;
	border-bottom: 2px solid #eee;
}
.loan-btn>div {
	flex:1;
	line-height: 3.5rem;
	text-align: center;	
}
.loan-btn>div>div {
	width: 45%;
	margin: 0 auto;
}
.loan-btn>div:nth-child(1) {
	border-right: 1px solid #eee;
}
.loan-btn>div>div.active {
	color: #000;
	border-bottom: 2px solid #fedf44;
}
	</style>
</head>
<body>
	<div>
		<div class="header">
			<div><div class="back"></div></div>
			<div>首页</div>
			<div><div class="user-img"></div></div>
		</div>
		<div class="main">
			<div class="home-banner">
				<div class="swiper-container">
			        <div class="swiper-wrapper">
			            <div class="swiper-slide">
			            	<a class="home-banner-list"><img src="img/home/banner.png" alt=""></a>
			            </div>
			            <div class="swiper-slide">
			            	<a class="home-banner-list"><img src="img/home/banner2.png" alt=""></a>
			            </div>
			            <div class="swiper-slide">
			            	<a class="home-banner-list"><img src="img/home/banner3.png" alt=""></a>
			            </div>
			        </div>
			    </div>
			</div>
			<div class="loan-btn">
				<div><div class="active">现金贷</div></div>
				<div><div>卡卡贷</div></div>
			</div>
			<div class="home-wrap">
				<div class="weui-cells">
		            <a class="weui-cell a-bg ">
		                <div class="weui-cell__hd ka-icon home-icon"></div>
		                <div class="weui-cell__bd home-p">
		                    <p>卡卡贷</p>
		                    <p class="home-p-text">额度高 费率低 放款</p>
		                </div>
		                <div class="weui-cell__ft">
		                	<div class="quota">贷款额度</div>
		                	<div class="money">1000-50000元</div>
		                </div>
		            </a>
		           	<a class="weui-cell a-bg">
		                <div class="weui-cell__hd home-icon pai-icon"></div>
		                <div class="weui-cell__bd home-p">
		                    <p>拍拍贷</p>
		                    <p class="home-p-text">简单快速借的到</p>
		                </div>
		                <div class="weui-cell__ft">
		                	<div class="quota">贷款额度</div>
		                	<div class="money">最高至200000元</div>
		                </div>
		            </a>
		            <a class="weui-cell a-bg">
		                <div class="weui-cell__hd small-icon home-icon"></div>
		                <div class="weui-cell__bd home-p">
		                    <p>小赢卡贷</p>
		                    <p class="home-p-text">快速审批，不差征信</p>
		                </div>
		                <div class="weui-cell__ft">
		                	<div class="quota">贷款额度</div>
		                	<div class="money">10000-50000元</div>
		                </div>
		            </a>
		            <a class="weui-cell a-bg">
		                <div class="weui-cell__hd xian-icon home-icon"></div>
		                <div class="weui-cell__bd home-p">
		                    <p>现金白卡</p>
		                    <p class="home-p-text">快速审批，不差征信</p>
		                </div>
		                <div class="weui-cell__ft">
		                	<div class="quota">贷款额度</div>
		                	<div class="money">10000-50000元</div>
		                </div>
		            </a>
		            <a class="weui-cell a-bg">
		                <div class="weui-cell__hd dou-icon home-icon"></div>
		                <div class="weui-cell__bd home-p">
		                    <p>豆豆钱</p>
		                    <p class="home-p-text">快速审批，不差征信</p>
		                </div>
		                <div class="weui-cell__ft">
		                	<div class="quota">贷款额度</div>
		                	<div class="money">10000-50000元</div>
		                </div>
		            </a>
		            <a class="weui-cell a-bg">
		                <div class="weui-cell__hd zhong-icon home-icon"></div>
		                <div class="weui-cell__bd home-p">
		                    <p>中赢微贷</p>
		                    <p class="home-p-text">快速审批，不差征信</p>
		                </div>
		                <div class="weui-cell__ft">
		                	<div class="quota">贷款额度</div>
		                	<div class="money">10000-50000元</div>
		                </div>
		            </a>
		            <a class="weui-cell a-bg">
		                <div class="weui-cell__hd qian-icon home-icon"></div>
		                <div class="weui-cell__bd home-p">
		                    <p>向钱贷</p>
		                    <p class="home-p-text">快速审批，不差征信</p>
		                </div>
		                <div class="weui-cell__ft">
		                	<div class="quota">贷款额度</div>
		                	<div class="money">10000-50000元</div>
		                </div>
		            </a>
        		</div>
			</div>
		</div>
	</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script src="js/swiper-3.4.2.jquery.min.js"></script>
	<script src="js/weui.min.js"></script>
	<script src="js/index.js"></script>
	<script>
		var swiper = new Swiper('.swiper-container', {
	        loop: true,
	        autoplay : 3000,
	    });
	    var bannerWidth = 320;
	    var bannerHeight = 152;
	    $(".swiper-container").height($(".swiper-container").width()/(bannerWidth / bannerHeight));

	    //动态显示icon
	    var imglist = ["./img/home/ka.png","./img/home/pai.png","./img/home/small.png","./img/home/xian.png","./img/home/dou.png","./img/home/zhong.png","./img/home/qian.png"];
	    console.log(imglist)
	    $(".home-icon").each(function(n) {
	    	$(this).css("background",'url("'+imglist[n]+'")')
	    	$(this).css("background-size",'100% auto')
	    })


	    $(".loan-btn div").each(function() {
	    	$(this).click(function() {
	    		$(this).parent().children().children().removeClass("active");
	    		$(this).children().addClass("active")
	    	})
	    	
	    })
	</script>
	
</body>
</html>